package adapters;

import android.content.Context;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.ListFragment;
import finder.SubjectFinder;
import finder.SubjectViewer;

public class AdapterCourse extends FragmentPagerAdapter {

	Context c;
	ListFragment lf = new ListFragment();

	public AdapterCourse (Context context, FragmentManager fm) {
		super(fm);
		c = context;
	}

	@Override
	public ListFragment getItem(int position) {

		switch (position) {

		case 0:
			lf = SubjectFinder.newInstance(c);
			break;
		case 1:
			lf = SubjectViewer.newInstance(c);
			break;
		}
		
		return lf;
	
	}

	@Override
	public int getCount() {
		return 2;
	}
	
	public String getTag(int position) {
		return null;
	}

}